<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    for循环
    for(int i=1;i<=9;i++){
        i
    }<br/>
    //循环 变量i 从1开始 到9结束 自增1
    <c:forEach var="i" begin="1" end="9" step="1">
        ${i}&nbsp;
    </c:forEach>
<hr/>
    foreach循环
    int i=0,j=1;
    for(String s:list){
        s
        i++;j++;
    }
    <%
        List<String> list = new ArrayList<>();
        list.add("aa");list.add("bb");list.add("cc");
        request.setAttribute("LIST",list);
    %>
    <c:forEach var="s" items="${LIST}" varStatus="j">
        ${s}&nbsp;${j.index}&nbsp;${j.count}<br/>
    </c:forEach>
    //重定向
    <c:redirect url="a2.jsp?a=1&b=2"></c:redirect>
    //编码集
    <f:requestEncoding value="utf-8"></f:requestEncoding>
</body>
</html>
